﻿using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Messaging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VisionApp.Interface;
using VisionAppManager.Model;

namespace VisionAppManager.ViewModel
{
    public class VMSearch : ViewModelBase
    {
        public RelayCommand SearchVideoCommand { get; private set; }
        private Worker _worker;
        public Worker Worker
        {
            get
            {
                return _worker;
            }
            set
            {
                _worker = value;
                RaisePropertyChanged("Worker");
            }
        }

        public VMSearch(IWorker worker)
        {
            Worker = (Worker)worker;
            SearchVideoCommand = new RelayCommand(() => Worker.Vision.SearchVideo());
        }
    }
}
